<div>

@foreach($menus as $menu)
    <div class="menu"
         data-id="{{ $menu['id'] }}"
         {{ $menu['permission']?'data-permission='.$menu['permission']:'' }}
         data-pid={{ $menu['pid'] }}
         data-order={{ $menu['order'] }}
         data-name={{ $menu['name'] }}
         style="margin:2px;padding-left:10px;{{ ($menutype)?'display:none':''  }}">

        <div class="menu-name" >
            @if(!$menu['permission'])
                <i class="fa fa-th-list"></i>
            @else
                <i class="fa fa-file-o"></i>
            @endif
            :
            {{ $menu['name'] }}
        </div>
        {{--<span>--}}
            {{--<button>删除</button>--}}
        {{--</span>--}}

    </div>
    @if(!$menu['permission'])
        <div style="padding-left:30px;">

            {!! view('Home.Menu.menu',
            ['menus'=>(isset($menu['children'])?$menu['children']:[]),
            'menu'=>['pid'=>$menu['id']],
            'menutype'=>true]
            ) !!}
        </div>
    @endif
@endforeach
    {{--<div class="menu" data-pid="{{ isset($menu['pid'])?$menu['pid']:0 }}"style="{{ ($menutype)?'display:none':''  }}" >--}}
        {{--<button>添加菜单</button>--}}
    {{--</div>--}}
</div>
